var webpack = require('webpack');
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');
var ExtractTextPlugin = require("extract-text-webpack-plugin");

module.exports = {

	entry: {
		grid: './src/noke.grid.1.1.2.js',
		bundle: './src/entry',
		base: './src/base/base',

		// normalize: './node_modules/normalize.css/normalize.css',
		// main: './src/main.scss',
	},
	output: {
		path: 'dist',
		filename: "[name].js",
        chunkFilename: "[id].js"
	},

	module: {
		loaders: [
			{ test: /\.js$/, loader: "babel" },
			{ test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader") },
			{ test: /\.scss$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader") },
			//{test: /\.(jpg|png|svg)$/, loader: "url?limit=8192"},
		]
	},
	plugins: [
		new webpack.optimize.CommonsChunkPlugin('common.js'),
		new ExtractTextPlugin("[name].css"),
	]
};